/*
 * @Description: 新消息提醒
 * @Author: iamsmiling
 * @Date: 2021-05-28 12:15:36
 * @LastEditTime: 2021-05-28 12:29:24
 */
import 'package:credit_business_circle/R/R.dart';
import 'package:credit_business_circle/domain/local/list_tile_entity.dart';
import 'package:credit_business_circle/pages/mine/children/setting/children/message_alert/message_alert_controller.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class MessageAlertPage extends GetView<MessageAlertController> {
  const MessageAlertPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("新消息提醒"),
      ),
      body: Container(
        color: R.color.ffffffff,
        child: ListView(
          shrinkWrap: true,
          padding: EdgeInsets.zero,
          children: [
            for (ListTileEntity item in controller.tiles)
              Container(
                decoration: BoxDecoration(
                    border: Border(
                        bottom:
                            BorderSide(color: R.color.ffdddddd, width: .5))),
                margin: EdgeInsets.symmetric(horizontal: R.dimen.dp16),
                padding: EdgeInsets.symmetric(vertical: R.dimen.dp8),
                child: Container(
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: [
                      Text(
                        item.label,
                        style: TextStyle(
                          fontSize: R.dimen.sp15,
                        ),
                      ),
                      CupertinoSwitch(value: item.enabled, onChanged: (_) {})
                    ],
                  ),
                ),
              )
          ],
        ),
      ),
    );
  }
}
